package com.demo.bean;

import javax.servlet.http.HttpSession;

/**
 * @author WuLiangHang
 */
public class User {
    /**
     * 用户名
     */
    private String name;
    /**
     * ip地址
     */
    private String ip;
    /**
     * 登录时间
     */
    private String loginTime;
    private HttpSession session;

    public User(String name, String ip, String loginTime, HttpSession session) {
        this.name = name;
        this.ip = ip;
        this.loginTime = loginTime;
        this.session = session;
    }

    public User() {
    }

    public User(String name, String ip, String loginTime) {
        this.name = name;
        this.ip = ip;
        this.loginTime = loginTime;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", ip='" + ip + '\'' +
                ", loginTime='" + loginTime + '\'' +
                ", session=" + session +
                '}';
    }

    public HttpSession getSession() {
        return session;
    }

    public void setSession(HttpSession session) {
        this.session = session;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(String loginTime) {
        this.loginTime = loginTime;
    }
}
